package net.loyintean.pearlshell.validation.rule;

import net.loyintean.pearlshell.validation.IValidRule;
import net.loyintean.pearlshell.validation.IValidRuleConfig;

class ObjNotNullValidRuleImpl implements IValidRule {

	ObjNotNullValidRuleImpl() {
		super();
	}

	@Override
	public boolean valid(Object toValid, IValidRuleConfig config) {
		return toValid != null;
	}

	@Override
	public String errorMsg(IValidRuleConfig config) {
		return "不能为空";
	}

}
